Skip to content

docs: fix string interpolation and missing JSDoc annotations#13284

Merged
kgryte merged 3 commits into
developfrom
philipp/fix-propagation-2026-07-05
Jul 5, 2026
Merged

docs: fix string interpolation and missing JSDoc annotations#13284
kgryte merged 3 commits into
developfrom
philipp/fix-propagation-2026-07-05

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

Propagating fixes merged to develop between 2026-07-04 21:17 UTC and 2026-07-05 12:00 UTC to sibling packages that carry the same defects.

docs: fix logEachMap format specifier (source: 4e24379)

The logEachMap format string uses stdlib's format spec, not C printf. %lf is not a valid token; %0.4f is the intended form. 4e24379 fixed the tukey-lambda/mode example; the same wrong specifier is present in the following sibling distribution READMEs and their examples/index.js:

  • stats/base/dists/anglit/mean
  • stats/base/dists/anglit/median
  • stats/base/dists/anglit/quantile
  • stats/base/dists/halfnormal/mean

Replacement is confined to the logEachMap line in each file; the %lf tokens inside C printf examples elsewhere in each README are untouched.

chore: fix copy-pasted equation labels (source: 6e257ba)

6e257ba corrected a betaprime/mode/README.md whose equation label, data-equation, and image path still read _expectation from a mean-package copy-paste. The same three tokens plus a stale alt attribute appear in:

  • stats/base/dists/levy/modelabel, data-equation, and SVG path corrected to _mode.
  • stats/base/dists/levy/median — same three tokens corrected to _median, plus alt="Mode for a Lévy distribution.""Median for a Lévy distribution." on both the <equation> and the <img> element.

docs: add missing @private tag (sources: a1a8d32, 7d1419f)

Both source commits inserted * @private into the JSDoc block of stats/base/dists/log-logistic/{cdf,quantile}/lib/native.js because the wrapper is an internal binding, not part of the public API. The same JSDoc block in the following native.js files omits the tag:

  • stats/base/dists/bradford/entropy
  • stats/base/dists/cosine/quantile
  • stats/base/dists/gamma/pdf
  • stats/base/dists/logistic/cdf
  • stats/base/dists/poisson/pmf
  • stats/base/dists/signrank/pdf

Insertion form matches the source commits exactly: one new * @private line between the blank comment line following the description and the first @param.

Related Issues

None.

Questions

None.

Other

Validation

  • Pattern signatures were derived from the source commits' diffs and searched under lib/node_modules/@stdlib/stats/base/dists/.
  • Two independent validation passes read each candidate file in full, confirmed the defect was present, and verified the proposed patch is self-contained. Style consistency matches the source commits verbatim.
  • Deliberately excluded: %lf occurrences inside C printf examples (legitimate C format specifiers); README label="eq:*_expectation" occurrences in mean/ packages (label is semantically correct there); autogenerated files (math/base/special/*/lib/rational_pq.js — matched return Infinity but carry a "generated file" marker, so the fix belongs in the generator).
  • Grouping: one commit per source fix pattern to keep the audit trail per-pattern.

Checklist

AI Assistance

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

This PR was authored by Claude Code as part of an automated fix-propagation routine that scans the previous 24 hours of commits merged to develop, extracts generalizable fix patterns, locates sibling packages with the same defect, and produces a draft PR for maintainer review. Each candidate site was independently validated by two adversarial review passes before the patch was applied.


@stdlib-js/reviewers


Generated by Claude Code

claude added 3 commits July 5, 2026 13:17
Propagates fix from 4e24379 ("docs: fix string interpolation and update
comments") to sibling distribution packages where the `logEachMap` format
string uses the C-style `%lf` specifier instead of the required `%0.4f`.
Propagates fix from 6e257ba ("chore: fix copy-paste mistakes") to
sibling packages whose README equation labels, `data-equation` values,
and SVG image paths still say `_expectation` from a mean-package
copy-paste. Also corrects alt text on the median README.
Propagates fix from a1a8d32 ("chore: clean-up") and 7d1419f ("test:
fix tests and clean-up docs") to sibling distribution packages whose
`native.js` JSDoc block omits the `@private` tag that marks the wrapper
function as internal.
@stdlib-bot stdlib-bot added the Statistics Issue or pull request related to statistical functionality. label Jul 5, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/dists/anglit/mean $\\color{green}175/175$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}175/175$
$\\color{green}+100.00\\%$
stats/base/dists/anglit/median $\\color{green}175/175$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}175/175$
$\\color{green}+100.00\\%$
stats/base/dists/anglit/quantile $\\color{green}297/297$
$\\color{green}+100.00\\%$
$\\color{green}27/27$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}297/297$
$\\color{green}+100.00\\%$
stats/base/dists/bradford/entropy $\\color{green}172/172$
$\\color{green}+100.00\\%$
$\\color{green}8/8$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}172/172$
$\\color{green}+100.00\\%$
stats/base/dists/cosine/quantile $\\color{red}366/367$
$\\color{green}+99.73\\%$
$\\color{red}35/36$
$\\color{green}+97.22\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{red}366/367$
$\\color{green}+99.73\\%$
stats/base/dists/gamma/pdf $\\color{red}487/539$
$\\color{green}+90.35\\%$
$\\color{red}40/49$
$\\color{green}+81.63\\%$
$\\color{green}6/6$
$\\color{green}+100.00\\%$
$\\color{red}487/539$
$\\color{green}+90.35\\%$
stats/base/dists/halfnormal/mean $\\color{green}168/168$
$\\color{green}+100.00\\%$
$\\color{green}8/8$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}168/168$
$\\color{green}+100.00\\%$
stats/base/dists/levy/median $\\color{green}182/182$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}182/182$
$\\color{green}+100.00\\%$
stats/base/dists/levy/mode $\\color{green}175/175$
$\\color{green}+100.00\\%$
$\\color{green}9/9$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}175/175$
$\\color{green}+100.00\\%$
stats/base/dists/logistic/cdf $\\color{green}273/273$
$\\color{green}+100.00\\%$
$\\color{green}25/25$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}273/273$
$\\color{green}+100.00\\%$
stats/base/dists/poisson/pmf $\\color{green}296/296$
$\\color{green}+100.00\\%$
$\\color{green}29/29$
$\\color{green}+100.00\\%$
$\\color{green}4/4$
$\\color{green}+100.00\\%$
$\\color{green}296/296$
$\\color{green}+100.00\\%$
stats/base/dists/signrank/pdf $\\color{red}359/361$
$\\color{green}+99.45\\%$
$\\color{red}36/37$
$\\color{green}+97.30\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{red}359/361$
$\\color{green}+99.45\\%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte marked this pull request as ready for review July 5, 2026 19:56
@kgryte kgryte requested a review from a team July 5, 2026 19:56
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. labels Jul 5, 2026
@kgryte kgryte changed the title docs: propagate recent fixes across stats/base/dists/* packages docs: fix string interpolation and missing JSDoc annotations Jul 5, 2026
@kgryte kgryte merged commit 112dcfc into develop Jul 5, 2026
71 checks passed
@kgryte kgryte deleted the philipp/fix-propagation-2026-07-05 branch July 5, 2026 19:57
@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. and removed Needs Review A pull request which needs code review. labels Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements, additions, or changes to documentation. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants